home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 11 / Amiga Plus 11: Amiga Future.iso / rexx / test.rexx < prev    next >
OS/2 REXX Batch file  |  1997-07-22  |  910b  |  45 lines

  1. /*
  2.  
  3.                         **************************
  4.                         **** xFX ARexx script ****
  5.                         **************************
  6.  
  7.  
  8.                        ARexx command tester for xFX
  9. */
  10.  
  11.  
  12. if ~show('P','xFX.1') then do  /* Check if xFX is running */
  13.   say 'xFX not running !'
  14.   exit
  15. end
  16.  
  17. address 'xFX.1'
  18. options prompt 'xFX> '
  19. options results
  20.  
  21. say 'Type QUIT to exit.'
  22.  
  23. GoLabel:
  24.   signal on Error
  25.   signal on Syntax
  26.  
  27.   do forever
  28.     parse pull command    /* get a command from the user      */
  29.     drop rc        /* clear out previous return code */
  30.     drop result        /* clear out previous result      */
  31.     interpret command    /* execute the command          */
  32.     if upper(command) = 'QUIT' then exit
  33.     say result
  34.   end
  35.  
  36.  
  37.  
  38. Error:
  39. Syntax:
  40.   say 'ERROR:'
  41.   say ' ARexx return code..' rc
  42.   say ' ARexx message......' '"'errortext(rc)'"'
  43.   say ' xFX message........' '"'xFX.LASTERROR'"'
  44.   signal GoLabel
  45.